// 导入对象
import request from '@/utils/request'

//获取公司组织架构
export function getDepartments() {
    return request({
        url: '/company/department',
    })
}

// 删除部门
export function deleDepartments(id) {
    return request({
        url: `/company/department/${id}`,
        method: 'delete'
    })
}

// 新增部门
export function adddePartment(data) {
    return request({
        url: '/company/department',
        method: 'post',
        data
    })
}
// 编辑查看部门
export function examinePartment(id) {
    return request({
        url: `/company/department/${id}`,
    })
}

// 修改部门
export function putPartment(data) {
    return request({
        url: `/company/department/${data.id}`,
        method: 'put',
        data
    })
}


